<template>
    <div class="create_main">
        <StepOne v-if="dataForm.step==1" :dataForm='dataForm' />
        <StepTwo v-else-if="dataForm.step==2" :dataForm='dataForm' />
        <StepThree v-else-if="dataForm.step==3" :dataForm='dataForm' />
        <StepFour v-else-if="dataForm.step==4" :dataForm='dataForm' />
    </div>
</template>

<script>
import StepOne from "./StepOne";
import StepTwo from "./StepTwo";
import StepThree from "./StepThree";
import StepFour from "./StepFour";
export default {
    name: "",
    data() {
        return {
            resetForm: {
                step: 1,
                market: "VIDEO_PROM_GOODS",
                extension: "STANDARD",
                isChange: false,
                is_talent: false,
                tableData: [
                    {
                        searchAdver: "",
                        searchGroup: "",
                        searchAnchor: "",
                        groupList: [],
                        anchorList: [],
                        hasAdver: {},
                        hasGroup: {},
                        hasAchor: {},
                        hasShop: {},
                    },
                ],
                createform: {
                    external_action: "", //转化目标
                    creative_material_mode: "CUSTOM_CREATIVE", //创意类型
                    creative_way: "LIVE", //创意形式
                    creative_auto_generate: 1, //是否生成更多创意
                    is_homepage_hide: 1, //抖音主页是否隐藏视频
                    deep_external_action: "", //深度转化目标
                    roi_goal: "", //支付ROI目标
                    deep_bid_type: "MIN", //深度出价方式
                    type: "", //生产方式
                    lab_ad_type:'NOT_LAB_AD',//计划托管
                    enable_auto_pause:1,//超成本自动暂停
                    auto_manage_strategy_cmd:0,//托管策略
                    enable_follow_material:0,//是否优质素材自动同步投放
                    queuename: "",
                    //预算列表
                    budget_list: [
                        {
                            model_name: "用户出价1",
                            smart_bid_type: "SMART_BID_CUSTOM",
                            cost_control: false,
                            flow_control_mode: "FLOW_CONTROL_MODE_FAST",
                            budget_mode: "BUDGET_MODE_DAY",
                            budget: "300",
                            cpa_bid: "300",
                            schedule_fixed_range: "2",
                            video_schedule_type: "SCHEDULE_FROM_NOW",
                            delivery_time: [],
                            start_time: "",
                            end_time: "",
                            launch_period: "1",
                            schedule_time_value: "",
                            // schedule_time: {
                            //     timeContent: [],
                            //     timeSection: [],
                            //     timeStr: [],
                            //     rowUnit: [],
                            //     timeValue: [],
                            // },
                        },
                    ],
                    budget_active: 0,
                    //预算和出价
                    delivery: {
                        model_name: "",
                        smart_bid_type: "SMART_BID_CUSTOM", //投放方式
                        cost_control: false, //成本控制
                        flow_control_mode: "FLOW_CONTROL_MODE_FAST", //投放速度
                        budget_mode: "BUDGET_MODE_DAY", //预算类型
                        budget: "300", //预算
                        cpa_bid: "300", //出价
                        schedule_fixed_range: "2", //固定时长
                        video_schedule_type: "SCHEDULE_FROM_NOW", //投放日期
                        delivery_time: [], //开始结束日期
                        start_time: "", //开始时间
                        end_time: "", //结束时间
                        launch_period: "1", //投放时段
                        schedule_time_value: "",
                        // schedule_time: {
                        //     timeContent: [],
                        //     timeSection: [],
                        //     timeStr: [],
                        //     rowUnit: [],
                        //     timeValue: [],
                        // },
                    },

                    // 定向人群列表
                    audience_list: [
                        {
                            model_name: "定向人群1",
                            audience_mode: "AUTO", //智能推荐
                            isAllCity: false, //城市是否全选
                            district: "NONE", //城市
                            location_type: "CURRENT",
                            cityVal: [], //已选城市
                            cityHasCheck: [],
                            cityAllValue: [], //地域提交值
                            gender: "NONE", //性别
                            age: [], //年龄
                            awemeRadio: "1", //抖音达人切换
                            recomentRadio: "CLASS", //抖音达人切换
                            aweme_fan_behaviors: ["FOLLOWED_USER"], //已选抖音用户行为类型
                            aweme_fan_behaviors_days: "", //抖音达人互动用户行为天数
                            category_id: "", //推荐达人ID
                            category_text: "", //推荐名称
                            titokQuery: "", //抖音达人搜索
                            tiktokTypeOption: [], //达人分类列表
                            tiktokTypeCheck: [], //已选达人分类
                            tiktokTypeVal: [], //已选达人分类绑定值
                            titokTalentList: [], //抖音达人列表
                            titokTalentVal: [], //抖音达人绑定值ID
                            titokTalentText: [], //抖音达人显示值
                            tiktokAllCheck: [], //抖音达人总选
                            back_id: "", //返回达人ID
                            back_text: "", //返回达人名称
                            crowdRadio: "1", //更多人群切换
                            crowdTab: "1",
                            crowdDrop: "ALL",
                            plartformCrow: [], //平台精选人群列表
                            customCrow: [], //自定义人群列表
                            plartformVal: [], //平台精选人群绑定值
                            plartformText: [], //已选平台精选人群
                            customCrowdText: [], //已选自定义人群
                            allCrowdCheck: [], //人群总选
                            auto_extend_enabled: 0, //是否开启智能投放
                            auto_extend_targets: [], //已选智能投放绑定值
                            auto_extend_text: [], //已选智能投放列表
                            smart_interest_action: "", //行为兴趣类型
                            action_scene: ["E-COMMERCE", "NEWS", "APP"], //行为场景
                            actionTab: "1",
                            interestTab: "1",
                            action_days: "30", //行为天数
                            actionList: [], //行为类目列表
                            action_val: [], //行为类目绑定值
                            action_text: [], //行为类目已选值
                            action_key_list: [], //行为类目关键词列表
                            action_key_text: [], //行为类目已选关键词
                            actionAllCheck: [], //行为类目词总选值
                            actionKeyText: "", //已选行为类目
                            interestList: [], //兴趣类目列表
                            interest_val: [], //兴趣类目绑定值
                            interest_text: [], //兴趣类目已选值
                            interest_key_list: [], //兴趣关键词列表
                            interest_key_text: [], //兴趣已选关键词
                            interestAllCheck: [], //兴趣总选值
                            interestKeyText: "", //已选兴趣类目
                            age_null: "1",
                            ac: [], //网络
                            ac_null: "1",
                            platform: "", //平台
                            exclude_limited_region:0,//排除限定地区
                            new_customer:'NONE',//新客定向
                        },
                    ],

                    audience_active: 0,
                    // 定向人群数据
                    audience: {
                        model_name: "",
                        audience_mode: "AUTO", //智能推荐
                        isAllCity: false, //城市是否全选
                        district: "NONE", //城市
                        location_type: "CURRENT",
                        cityVal: [], //已选城市
                        cityHasCheck: [],
                        cityAllValue: [], //地域提交值
                        gender: "NONE", //性别
                        age: [], //年龄
                        awemeRadio: "1", //抖音达人切换
                        recomentRadio: "CLASS", //抖音达人切换
                        aweme_fan_behaviors: ["FOLLOWED_USER"], //已选抖音用户行为类型
                        aweme_fan_behaviors_days: "", //抖音达人互动用户行为天数
                        category_id: "", //推荐达人ID
                        category_text: "", //推荐名称
                        titokQuery: "", //抖音达人搜索
                        tiktokTypeOption: [], //达人分类列表
                        tiktokTypeCheck: [], //已选达人分类
                        tiktokTypeVal: [], //已选达人分类绑定值
                        titokTalentList: [], //抖音达人列表
                        titokTalentVal: [], //抖音达人绑定值ID
                        titokTalentText: [], //抖音达人显示值
                        tiktokAllCheck: [], //抖音达人总选
                        back_id: "", //返回达人ID
                        back_text: "", //返回达人名称
                        crowdRadio: "1", //更多人群切换
                        crowdTab: "1",
                        crowdDrop: "ALL",
                        plartformCrow: [], //平台精选人群列表
                        customCrow: [], //自定义人群列表
                        plartformVal: [], //平台精选人群绑定值
                        plartformText: [], //已选平台精选人群
                        customCrowdText: [], //已选自定义人群
                        allCrowdCheck: [], //人群总选
                        auto_extend_enabled: 0, //是否开启智能投放
                        auto_extend_targets: [], //已选智能投放绑定值
                        auto_extend_text: [], //已选智能投放列表
                        smart_interest_action: "", //行为兴趣类型
                        action_scene: ["E-COMMERCE", "NEWS", "APP"], //行为场景
                        actionTab: "1",
                        interestTab: "1",
                        action_days: "30", //行为天数
                        actionList: [], //行为类目列表
                        action_val: [], //行为类目绑定值
                        action_text: [], //行为类目已选值
                        action_key_list: [], //行为类目关键词列表
                        action_key_text: [], //行为类目已选关键词
                        actionAllCheck: [], //行为类目词总选值
                        actionKeyText: "", //已选行为类目
                        interestList: [], //兴趣类目列表
                        interest_val: [], //兴趣类目绑定值
                        interest_text: [], //兴趣类目已选值
                        interest_key_list: [], //兴趣关键词列表
                        interest_key_text: [], //兴趣已选关键词
                        interestAllCheck: [], //兴趣总选值
                        interestKeyText: "", //已选兴趣类目
                        age_null: "1",
                        ac: [], //网络
                        ac_null: "1",
                        platform: "", //平台
                        exclude_limited_region:0,//排除限定地区
                        new_customer:'NONE',//新客定向
                    },

                    creatinfo_active: 0,
                    creatinfo_list: [
                        {
                            model_name: "创意组1",
                            creative: [],
                        },
                    ],
                    // 制作创意
                    creatinfo: {
                        model_name: "",
                        creative: [],
                    },

                    creattitle_active: 0,
                    creattitle_list: [
                        {
                            model_name: "标题组1",
                            title: [
                                {
                                    title: "",
                                    dynamic_words: [],
                                },
                            ],
                        },
                    ],
                    // 创意标题
                    creattitle: {
                        model_name: "",
                        title: [
                            {
                                title: "",
                                dynamic_words: [],
                            },
                        ],
                    },

                    // 卡片
                    card: {
                        car_img: null,
                        car_name: "视频同款商品",
                        car_tag: ["商家倾情推荐"],
                        car_link: "查看详情",
                        is_fisrtchoid: 1,
                        picture_name: "",
                    },

                    // 创意分类
                    industry_active: 0,
                    industry_list: [
                        {
                            model_name: "创意分类1",
                            industryValue: [],
                            ad_keywords: [],
                            first_industry_id: "",
                            second_industry_id: "",
                            third_industry_id: "",
                        },
                    ],
                    industryClass: {
                        model_name: "创意分类1",
                        industryValue: [],
                        ad_keywords: [],
                        first_industry_id: "",
                        second_industry_id: "",
                        third_industry_id: "",
                    },

                    // 计划名称
                    name: "",
                    exp_name: "",
                },
            },
            dataForm: {
                step: 1,
                market: "VIDEO_PROM_GOODS",
                extension: "STANDARD",
                isChange: false,
                is_talent: false,
                tableData: [
                    {
                        searchAdver: "",
                        searchGroup: "",
                        searchAnchor: "",
                        groupList: [],
                        anchorList: [],
                        hasAdver: {},
                        hasGroup: {},
                        hasAchor: {},
                        hasShop: {},
                    },
                ],
                createform: {
                    external_action: "", //转化目标
                    creative_material_mode: "CUSTOM_CREATIVE", //创意类型
                    creative_way: "LIVE", //创意形式
                    creative_auto_generate: 1, //是否生成更多创意
                    is_homepage_hide: 1, //抖音主页是否隐藏视频
                    deep_external_action: "", //深度转化目标
                    roi_goal: "", //支付ROI目标
                    deep_bid_type: "MIN", //深度出价方式
                    type: "", //生产方式
                    lab_ad_type:'NOT_LAB_AD',//计划托管
                    enable_auto_pause:1,//超成本自动暂停
                    auto_manage_strategy_cmd:0,//托管策略
                    enable_follow_material:0,//是否优质素材自动同步投放
                    queuename: "",
                    //预算列表
                    budget_list: [
                        {
                            model_name: "用户出价1",
                            smart_bid_type: "SMART_BID_CUSTOM",
                            cost_control: false,
                            flow_control_mode: "FLOW_CONTROL_MODE_FAST",
                            budget_mode: "BUDGET_MODE_DAY",
                            budget: "300",
                            cpa_bid: "300",
                            schedule_fixed_range: "2",
                            video_schedule_type: "SCHEDULE_FROM_NOW",
                            delivery_time: [],
                            start_time: "",
                            end_time: "",
                            launch_period: "1",
                            schedule_time: {
                                timeContent: [],
                                timeSection: [],
                                timeStr: [],
                                rowUnit: [],
                                timeValue: [],
                            },
                        },
                    ],
                    budget_active: 0,
                    //预算和出价
                    delivery: {
                        model_name: "",
                        smart_bid_type: "SMART_BID_CUSTOM", //投放方式
                        cost_control: false, //成本控制
                        flow_control_mode: "FLOW_CONTROL_MODE_FAST", //投放速度
                        budget_mode: "BUDGET_MODE_DAY", //预算类型
                        budget: "300", //预算
                        cpa_bid: "300", //出价
                        schedule_fixed_range: "2", //固定时长
                        video_schedule_type: "SCHEDULE_FROM_NOW", //投放日期
                        delivery_time: [], //开始结束日期
                        start_time: "", //开始时间
                        end_time: "", //结束时间
                        launch_period: "1", //投放时段
                        schedule_time: {
                            //时间段
                            timeContent: [],
                            timeSection: [],
                            timeStr: [],
                            rowUnit: [],
                            timeValue: [],
                        },
                    },

                    // 定向人群列表
                    audience_list: [
                        {
                            model_name: "定向人群1",
                            audience_mode: "AUTO", //智能推荐
                            isAllCity: false, //城市是否全选
                            district: "NONE", //城市
                            location_type: "CURRENT",
                            cityVal: [], //已选城市
                            cityHasCheck: [],
                            cityAllValue: [], //地域提交值
                            gender: "NONE", //性别
                            age: [], //年龄
                            awemeRadio: "1", //抖音达人切换
                            recomentRadio: "CLASS", //抖音达人切换
                            aweme_fan_behaviors: ["FOLLOWED_USER"], //已选抖音用户行为类型
                            aweme_fan_behaviors_days: "", //抖音达人互动用户行为天数
                            category_id: "", //推荐达人ID
                            category_text: "", //推荐名称
                            titokQuery: "", //抖音达人搜索
                            tiktokTypeOption: [], //达人分类列表
                            tiktokTypeCheck: [], //已选达人分类
                            tiktokTypeVal: [], //已选达人分类绑定值
                            titokTalentList: [], //抖音达人列表
                            titokTalentVal: [], //抖音达人绑定值ID
                            titokTalentText: [], //抖音达人显示值
                            tiktokAllCheck: [], //抖音达人总选
                            back_id: "", //返回达人ID
                            back_text: "", //返回达人名称
                            crowdRadio: "1", //更多人群切换
                            crowdTab: "1",
                            crowdDrop: "ALL",
                            plartformCrow: [], //平台精选人群列表
                            customCrow: [], //自定义人群列表
                            plartformVal: [], //平台精选人群绑定值
                            plartformText: [], //已选平台精选人群
                            customCrowdText: [], //已选自定义人群
                            allCrowdCheck: [], //人群总选
                            auto_extend_enabled: 0, //是否开启智能投放
                            auto_extend_targets: [], //已选智能投放绑定值
                            auto_extend_text: [], //已选智能投放列表
                            smart_interest_action: "", //行为兴趣类型
                            action_scene: ["E-COMMERCE", "NEWS", "APP"], //行为场景
                            actionTab: "1",
                            interestTab: "1",
                            action_days: "30", //行为天数
                            actionList: [], //行为类目列表
                            action_val: [], //行为类目绑定值
                            action_text: [], //行为类目已选值
                            action_key_list: [], //行为类目关键词列表
                            action_key_text: [], //行为类目已选关键词
                            actionAllCheck: [], //行为类目词总选值
                            actionKeyText: "", //已选行为类目
                            interestList: [], //兴趣类目列表
                            interest_val: [], //兴趣类目绑定值
                            interest_text: [], //兴趣类目已选值
                            interest_key_list: [], //兴趣关键词列表
                            interest_key_text: [], //兴趣已选关键词
                            interestAllCheck: [], //兴趣总选值
                            interestKeyText: "", //已选兴趣类目
                            age_null: "1",
                            ac: [], //网络
                            ac_null: "1",
                            platform: "", //平台
                            exclude_limited_region:0,//排除限定地区
                            new_customer:'NONE',//新客定向
                        },
                    ],

                    audience_active: 0,
                    // 定向人群数据
                    audience: {
                        model_name: "",
                        audience_mode: "AUTO", //智能推荐
                        isAllCity: false, //城市是否全选
                        district: "NONE", //城市
                        location_type: "CURRENT",
                        cityVal: [], //已选城市
                        cityHasCheck: [],
                        cityAllValue: [], //地域提交值
                        gender: "NONE", //性别
                        age: [], //年龄
                        awemeRadio: "1", //抖音达人切换
                        recomentRadio: "CLASS", //抖音达人切换
                        aweme_fan_behaviors: ["FOLLOWED_USER"], //已选抖音用户行为类型
                        aweme_fan_behaviors_days: "", //抖音达人互动用户行为天数
                        category_id: "", //推荐达人ID
                        category_text: "", //推荐名称
                        titokQuery: "", //抖音达人搜索
                        tiktokTypeOption: [], //达人分类列表
                        tiktokTypeCheck: [], //已选达人分类
                        tiktokTypeVal: [], //已选达人分类绑定值
                        titokTalentList: [], //抖音达人列表
                        titokTalentVal: [], //抖音达人绑定值ID
                        titokTalentText: [], //抖音达人显示值
                        tiktokAllCheck: [], //抖音达人总选
                        back_id: "", //返回达人ID
                        back_text: "", //返回达人名称
                        crowdRadio: "1", //更多人群切换
                        crowdTab: "1",
                        crowdDrop: "ALL",
                        plartformCrow: [], //平台精选人群列表
                        customCrow: [], //自定义人群列表
                        plartformVal: [], //平台精选人群绑定值
                        plartformText: [], //已选平台精选人群
                        customCrowdText: [], //已选自定义人群
                        allCrowdCheck: [], //人群总选
                        auto_extend_enabled: 0, //是否开启智能投放
                        auto_extend_targets: [], //已选智能投放绑定值
                        auto_extend_text: [], //已选智能投放列表
                        smart_interest_action: "", //行为兴趣类型
                        action_scene: ["E-COMMERCE", "NEWS", "APP"], //行为场景
                        actionTab: "1",
                        interestTab: "1",
                        action_days: "30", //行为天数
                        actionList: [], //行为类目列表
                        action_val: [], //行为类目绑定值
                        action_text: [], //行为类目已选值
                        action_key_list: [], //行为类目关键词列表
                        action_key_text: [], //行为类目已选关键词
                        actionAllCheck: [], //行为类目词总选值
                        actionKeyText: "", //已选行为类目
                        interestList: [], //兴趣类目列表
                        interest_val: [], //兴趣类目绑定值
                        interest_text: [], //兴趣类目已选值
                        interest_key_list: [], //兴趣关键词列表
                        interest_key_text: [], //兴趣已选关键词
                        interestAllCheck: [], //兴趣总选值
                        interestKeyText: "", //已选兴趣类目
                        age_null: "1",
                        ac: [], //网络
                        ac_null: "1",
                        platform: "", //平台
                        exclude_limited_region:0,//排除限定地区
                        new_customer:'NONE',//新客定向
                    },

                    creatinfo_active: 0,
                    creatinfo_list: [
                        {
                            model_name: "创意组1",
                            creative: [],
                        },
                    ],
                    // 制作创意
                    creatinfo: {
                        model_name: "",
                        creative: [],
                    },

                    creattitle_active: 0,
                    creattitle_list: [
                        {
                            model_name: "标题组1",
                            title: [
                                {
                                    title: "",
                                    dynamic_words: [],
                                },
                            ],
                        },
                    ],
                    // 创意标题
                    creattitle: {
                        model_name: "",
                        title: [
                            {
                                title: "",
                                dynamic_words: [],
                            },
                        ],
                    },

                    // 卡片
                    card: {
                        car_img: null,
                        car_name: "视频同款商品",
                        car_tag: ["商家倾情推荐"],
                        car_link: "查看详情",
                        is_fisrtchoid: 1,
                        picture_name: "",
                    },

                    // 创意分类
                    industry_active: 0,
                    industry_list: [
                        {
                            model_name: "创意分类1",
                            industryValue: [],
                            ad_keywords: [],
                            first_industry_id: "",
                            second_industry_id: "",
                            third_industry_id: "",
                        },
                    ],
                    industryClass: {
                        model_name: "创意分类1",
                        industryValue: [],
                        ad_keywords: [],
                        first_industry_id: "",
                        second_industry_id: "",
                        third_industry_id: "",
                    },

                    // 计划名称
                    name: "",
                    exp_name: "",
                },
            },
        };
    },
    created() {
        this.dataForm = JSON.parse(window.sessionStorage.getItem("dataForm"))
            ? JSON.parse(window.sessionStorage.getItem("dataForm"))
            : this.dataForm;
        console.log(this.dataForm);
    },
    methods: {},
    components: {
        StepOne,
        StepTwo,
        StepThree,
        StepFour,
    },
};
</script>


<style scoped>
.create_main {
    /* min-height: 100%; */
    /* overflow: auto; */
    height: 100%;
}
</style>

